﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
using QLKS10_11.DAL;
using DevExpress.XtraGrid;

namespace QLKS10_11.BLL
{
    public class QLthietbi_BLL
    {
        Qlthietbi_DAL qlthietbi = new Qlthietbi_DAL();
        BindingSource bs = new BindingSource();
        public void HienThi(GridControl gc, BindingNavigator bd)
        {
            DataTable dt = qlthietbi.Laydanhsachchitietthietbi();
            bs.DataSource = dt;
            gc.DataSource = bs;
            bd.BindingSource = bs;
        }
        public DataRow NewRow()
        {
            return qlthietbi.NewRow();
        }
        public void Add(DataRow row)
        {
            qlthietbi.Add(row);
        }
        public bool Save()
        {
            return qlthietbi.Save();
        }
    }
}
